import request from '@/utils/request'

// api接口列表
const api = {
  list: 'bike.fitting/index',
  detail: 'bike.fitting/detail',
  add:'bike.fitting/book',
  edit:'bike.fitting/edit',
  remove: 'bike.fitting/remove'
}

//预约列表
export const list = (param) => {
  return request.get(api.list, param)
}


// 预约详情
export const detail = (bookingId) => {
  return request.get(api.detail, { bookingId })
}

// 新增预约
export const add = (data) => {
  return request.post(api.add, { form: data })
}

// 编辑预约
export const edit = (bookingId, data) => {
  return request.post(api.edit, { bookingId, form: data })
}

//取消预约
export const remove = (bookingId) => {
  return request.post(api.remove, { bookingId })
}
